import { DB_CONNECTION_TOKEN, PROJECT_REPO_TOKEN } from '../../const';
import { Connection } from 'typeorm';
import { ProjectEntity } from './project.entity';

export const ProjectProviders = [
  {
    provide: PROJECT_REPO_TOKEN,
    useFactory: (connection: Connection) => connection.getRepository(ProjectEntity),
    inject: [DB_CONNECTION_TOKEN],
  },
];